package com.itheima.dao;

import com.github.pagehelper.Page;
import com.itheima.pojo.Order;
import com.itheima.pojo.OrderMessage;
import com.itheima.pojo.OrderSetting;
import com.itheima.pojo.Setmeal;
import org.apache.ibatis.annotations.Param;
import org.springframework.security.core.parameters.P;

import java.util.Date;
import java.util.List;
import java.util.Map;

/**
 * @author qzh
 * @create 2020-01-10 2020/1/10
 */
public interface OrderSettingDao {

    void add(OrderSetting orderSetting);
    void editNumberByOrderDate(OrderSetting orderSetting);
    long findCountByOrderDate(Date orderDate);


    List<OrderSetting> getOrderSettingByMonth(@Param("begin") String begin,@Param("end") String end);


    OrderSetting findByOrderDate(Date date);
    //更新已预约人数
    void editReservationsByOrderDate(OrderSetting orderSetting);

    Page<Order> findByCondition(String queryString);

    List<Setmeal> findAll();

    void addOrderSetting(OrderMessage map);

    void deleteOrderMessageAndSetmealRel(Integer id);

    void saveOrderMessageAndSetmealRel(@Param("setmealId") Integer setmealId, @Param("id") Integer id);
}
